package lormi.meipin.controller.api;



import lormi.meipin.common.Result;
import lormi.meipin.controller.BaseController;
import lormi.meipin.dto.SchoolPageDto;
import lormi.meipin.exception.LMException;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;


/**
 * 学校管理
 * */
@RestController
@RequestMapping(value="v2/school/",method=RequestMethod.POST,produces = "application/json; charset=utf-8")
public class SchoolController extends BaseController{

	
	
	/**
	 * 获取学校列表
	 * @Param userid 用户ID
	 * @Param usertype 用户类型
	 * @Param cityid 城市ID
	 * @Param specialclassid 职位ID
	 * @Param pagesize  
	 * @Param pagenow
	 * 
	 * */
	@RequestMapping("list")
	public String list(@Valid SchoolPageDto schoolPageDto,BindingResult result) throws LMException{
		
		checkResult(result);
	
		return Result.success(schoolService.getPage(schoolPageDto));
	}
	
}
